import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
import { SettingOutlined } from '@vicons/antd';
import { renderIcon } from '@/utils/index';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/setting',
    name: 'Setting',
    redirect: '/setting/account',
    component: Layout,
    meta: {
      title: '系统工具',
      icon: renderIcon(SettingOutlined),
      sort: 5,
    },
    children: [
      {
        path: 'user',
        name: 'setting-user',
        meta: {
          title: '用户设置',
        },
        component: () => import('@/views/setting/user/index.vue'),
      },
      {
        path: 'logs',
        name: 'system-logs',
        meta: {
          title: '系统日志',
        },
        component: () => import('@/views/system/log/logs.vue'),
      },
    ],
  },
];

export default routes;
